package com.softeem.fx1;

import com.softeem.fx.Stu;
import com.softeem.fx.User;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/4/3 9:03
 * @description 泛型类
 */
public class Demo_01 <S,D,I>{
    public D add(D d,I i){
        System.out.println(d);
        System.out.println(i);
        return null;
    }
    public void select(S... s){
        System.out.println(s.length);
        System.out.println(Arrays.toString(s));
    }

    public static void main(String[] args) {
        Demo_01<String, Double, Integer> demo_01 = new Demo_01<>();
        demo_01.add(5.53,200);

        Demo_01<Stu, User, Integer> demo_02 = new Demo_01<>();
        User user = new User(1,"张三");
        demo_02.add(user,200);

        Demo_01<Stu, User, Object> demo_03 = new Demo_01<>();
        User user1 = new User(1,"张三");
        String s = new String("明天清明节，今天晚上不要瞎逛");
        demo_03.add(user1,s);

        Demo_01<Integer,String,Double> demo_011 = new Demo_01<Integer,String,Double>();
        demo_011.select(1,11,111,1111,11111);
    }
}
